package com.joyance.springmvc.util;

import java.text.DecimalFormat;

public class CustomNumberTool {

	public static String format(String d, String format) {

		DecimalFormat df = new DecimalFormat(format);
		return df.format(Double.parseDouble(d));
	}

	public static void main(String[] args) {
		System.out.println(CustomNumberTool.format("1", "#0.000"));
	};
}
